package com.example.initproj.hello

import com.example.initproj.base.result.PARAMS_NULL
import com.example.initproj.base.result.Result
import com.example.initproj.base.result.failed
import com.example.initproj.base.result.succeed
import com.example.initproj.hello.param.HelloRequest
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.RestController

/**
 * @author xiang
 * @Date 2022/8/25 22:48
 **/

@RestController
class HelloController {

    @GetMapping("/hello")
    fun hello(request: HelloRequest): Result{
        return succeed("Hello ${request.name}")
    }

}